﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Sys
{
    /// <summary>
    /// 用户业务类
    /// </summary>
    public class MembershipUser
    {
        /// <summary>
        /// 不允许自动构造
        /// </summary>
        private MembershipUser()
        {

        }

        #region private Field字段

        private string _Name = string.Empty;
        private Csla.Core.MobileList<string> _Roles = new Csla.Core.MobileList<string>();
        private Dictionary<string, string> _Acclist = new Dictionary<string, string>();
        private bool isOpen = false;
        private System.Security.Principal.IPrincipal _Principal;
        private static MembershipUser _User;
        #endregion
 
        
        /// <summary>
        /// 身份标志
        /// </summary>
        public System.Security.Principal.IPrincipal Principal
        {
            set { _Principal = value; }
            get { return _Principal; }
        }
        private DateTime _LoginDateTime;
        
        /// <summary>
        /// 用户名
        /// </summary>
        public string Name {
            set { this._Name = value; }
            get { return this._Name; }
        }

        /// <summary>
        /// 静态构造函数
        /// </summary>
        /// <returns></returns>
        public static MembershipUser GetUser()
        {
            return new MembershipUser();
        }
        /// <summary>
        /// 登陆信息 
        /// </summary>
        /// <param name="userName"></param>
        /// <param name="passWord"></param>
        /// <returns></returns>
        //public static MembershipUser Login(string userName, string passWord)
        //{
        //    //MembershipUser returnObject = null;
        //    //MembershipUser mUser = MembershipUser.GetUser();
        //    //mUser=Sys.Core.Security.TKPrincipal.Login(userName, passWord);
        //    //if (mUser!=null)
        //    //{

        //    //    returnObject = mUser;
               
        //    //};
        //    return false;
        //}


    }
}
